package hy.util;

import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice//表示全局异常处理类,给前端返回Result对象
public class GloEx {
    @ExceptionHandler(Exception.class)
    public String exe1Handle(Exception e) {
        e.printStackTrace();
        return e.getMessage();
    }
}